package com.jiazhong.front.controller;

import com.jiazhong.commons.Util.JsonResult;
import com.jiazhong.front.service.CategoryService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/category")
public class CategoryController {
    @Resource
    private CategoryService service;

    @GetMapping
    public JsonResult find() {
        return service.findAll();
    }
}